var net = require('net');
var charServer = net.createServer();
clientList=[];

charServer.on('connection', function(client){
            clientList.push(client); 
            client.on('data' , function(data){
                    client.name = client.remoteAddress + ":" + client.remotePort;
                    client.write("Hello");
                    for(var i = 0 ; i < clientList.length ; i++){
                        if(client != clientList[i]){
                            clientList[i].write(client.name + " says: " + data);
                        }
                        
                    }
                });
        });
charServer.listen(9000);
console.log("Server is started @9000");
